aboutsummaryrefslogtreecommitdiff
path: root/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
blob: d05ee160d96308be3f7dab4b092d07cc00e4922d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Compilation unit elements:

(
    function
    "shed__function__User__0"
    visibility=private
    locals=((param "closurePointer__0" data-ptr) (param "local__isActive" int) (param "local__name" int) (val "structValuePointer__0" data-ptr) (val "structValue__0" int))
    return-type=int
    body=(
        (alloc-heap (local "structValuePointer__0") (struct (data-ptr (struct (int (struct (int int)))))))
        (
            memory-store
            pointer=(local "structValuePointer__0")
            layout=(struct (data-ptr (struct (int (struct (int int))))))
            offset=(1 0)
            value=(int 0)
        )
        (
            memory-store
            pointer=(local "structValuePointer__0")
            layout=(struct (data-ptr (struct (int (struct (int int))))))
            offset=(1 1 0)
            value=(local "local__name")
        )
        (
            memory-store
            pointer=(local "structValuePointer__0")
            layout=(struct (data-ptr (struct (int (struct (int int))))))
            offset=(1 1 1)
            value=(local "local__isActive")
        )
        (data-ptr-to-int (local "structValue__0") (local "structValuePointer__0"))
        (return (local "structValue__0"))
    )
)

Locals:
 * (val "structType__User__0" int)
 * (val "closurePointer__User__0" data-ptr)

Instructions:

(
    (alloc-heap (local "closurePointer__User__0") (struct (data-ptr (struct (function-ptr (struct ()) (struct ()))))))
    (
        memory-store
        pointer=(local "closurePointer__User__0")
        layout=(struct (data-ptr (struct (function-ptr (struct ()) (struct ())))))
        offset=(1 0)
        value=(function-ptr "shed__function__User__0")
    )
    (data-ptr-to-int (local "structType__User__0") (local "closurePointer__User__0"))
)

Temporary stack:
 * PatioLocalRef[name=structType__User__0]